/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yunhoo.pay.db.impl;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.yunhoo.sys.db.util.IbatisTemplate;
import com.yunhoo.sys.util.common.LoginParam;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Administrator
 */
public class StyleDetailImpl {

    private static String nameSpace = "styleDetail.";

    private static Map paramMap() {
        Map map = new HashMap();
        map.put("orgCode", LoginParam.getOrg().getCode());
        return map;
    }

    public static void insertStyleDetail(Map map) {
        IbatisTemplate.insert(nameSpace + "insertStyleDetail", map);
    }

    public static void insertStyleDetail(SqlMapClient client, Map map) throws SQLException {
        client.insert(nameSpace + "insertStyleDetail", map);
    }

    public static void updateStyleDetail(Map map) {
        IbatisTemplate.update(nameSpace + "updateStyleDetail", map);
    }

//    public static void deleteStyleDetail(Map map) {
//        IbatisTemplate.delete("deleteStyleDetail", map);
//    }
    
    public static void deleteStyleDetail(String str) {
        Map map = paramMap();
        map.put("number", str);
        IbatisTemplate.delete(nameSpace + "deleteStyleDetail", map);
    }

    public static void deleteStyleDetail(SqlMapClient client, String str) throws SQLException {
        Map map = paramMap();
        map.put("number", str);
        client.delete(nameSpace + "deleteStyleDetail", map);
    }
}
